#include <stdio.h>
#define DEBUG 0
enum { WMAX = 80, HMAX = 40 };

typedef unsigned grid_t;
typedef unsigned short WORD;
enum { GEMPTY=0, GWALL=1, GTARGET=2, GMAN=4, GBOX=8, INVALID = 16 };

extern const char gamename[];

extern grid_t map[HMAX][WMAX];
extern int height, width;
extern int xman, yman;

size_t nbox, nbox_ontarget;
